package com.zsrt.java.day20161223.xww.demo06;

import java.util.Scanner;

import org.junit.Test;

public class Counter {

	@Test
	public void test06(){
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入第一个数字:");
		int a =sc.nextInt();
		System.out.println("请输入一个符号如+-*/%");
		String b =sc.next();
		System.out.println("请输入第二个数字:");
		int c =sc.nextInt();
		sc.close();
		switch (b) {
			case "+":System.out.println(a+c);break;
			case "-":System.out.println(a-c);break;
			case "*":System.out.println(a*c);break;
			case "/":System.out.println(a/c);break;
			case "%":System.out.println(a%c);break;
			default:break;
		}
	}
}
